$(document).ready(function(){
	var count=$("#count").val();
	var price=$("#price span").text();
	var total
	//price=price.split("￥")[1];
	total = price * count;
	total = "￥" + price;
	$("#total span").text(total)
	$("#add").click(function(){
		count=count*1+1;
		$("#count").val(count);
		total=price*count;
		total="￥"+total;
//		alert(total)
		$("#total span").text(total)
	})
	$("#sub").click(function(){
		if(count!=0){
			count=count-1;
		$("#count").val(count);
		total = price * count;
		total = "￥" + total;
		$("#total span").text(total)
		}
		
	})
})
